Eliminate sluggishness and hangs in fontification of "semicolon deserts".
authorAlan Mackenzie <acm@muc.de>
Wed, 18 Jan 2012 13:19:31 +0000 (13:19 +0000)
committerAlan Mackenzie <acm@muc.de>
Wed, 18 Jan 2012 13:19:31 +0000 (13:19 +0000)
commitb0b68fedb6a6fe7bc55c1fe4f256bda9a93134b5
tree13a27d457a62038061dcc0cbb360b646f3dcd16e
parent3981fa979cb8fd47849e67b0dd3a50efe249d397
Eliminate sluggishness and hangs in fontification of "semicolon deserts".

cc-engine.el (c-state-nonlit-pos-interval): change value 10000 -> 3000.
(c-state-safe-place): Reformulate so it doesn't stack up an infinite
number of wrong entries in c-state-nonlit-pos-cache.
(c-determine-limit-get-base, c-determine-limit): New functions to
determine backward search limits disregarding literals.
(c-find-decl-spots): Amend commenting.
(c-cheap-inside-bracelist-p): New function which detects "={".

cc-fonts.el (c-make-font-lock-BO-decl-search-function): Give a limit to a
backward search.
(c-font-lock-declarations): Fix an occurrence of point being undefined.
Check additionally for point being in a bracelist or near a macro
invocation without a semicolon so as to avoid a fruitless time consuming
search for a declarator.  Give a more precise search limit for
declarators using the new c-determine-limit.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-fonts.el